﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="HeadingSection.aspx.cs" Inherits="HeadingSection" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" Visible="false">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <asp:ObjectDataSource ID="ODSHeadingSection" runat="server" UpdateMethod="Update" SelectMethod="GetHeadingSectionData"
        TypeName="IPTableAdapters.HeadingSectionTableAdapter" OldValuesParameterFormatString="original_{0}">
        <UpdateParameters>
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="OwnerGroupID" Type="String" />
            <asp:Parameter Name="Section" Type="String" />
        </UpdateParameters>
    </asp:ObjectDataSource>
    <div style="margin-left:10px;margin-right:10px;">
        <fieldset>
            <legend><asp:Label ID="lblHeadingSectionAdd" runat="server" Text="Edit Procedure Section" meta:resourcekey="lblHeadingSectionAddResource1"></asp:Label></legend>
            <table style="width: 661px; height: 53px">
                <tr>
                    <td style="width: 20%; vertical-align: top; text-align: right;">
                        <asp:Label ID="lblSection" runat="server" Text="Section" Width="103px" meta:resourcekey="lblSectionResource1"></asp:Label></td>
                    <td style="text-align: left;">
                        <asp:TextBox ID="txtSection" runat="server" CssClass="required" meta:resourcekey="txtSectionResource1" MaxLength="30" Width="203px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSection"
                            Display="Dynamic" ErrorMessage="Section is a required field." meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td style="width: 20%; vertical-align: top; text-align: right;">
                        <asp:Label ID="lblDescription" runat="server" Text="Description" Width="103px" meta:resourcekey="lblDescriptionResource1"></asp:Label></td>
                    <td style="text-align: left;">
                        <asp:TextBox ID="txtDescription" runat="server" Width="319px" CssClass="required" meta:resourcekey="txtDescriptionResource1" MaxLength="100"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtDescription"
                            Display="Dynamic" ErrorMessage="Description is a required field." meta:resourcekey="RequiredFieldValidator2Resource1"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td style="width: 100%; text-align: center;" colspan="2">
                        <asp:Button ID="btnModify" runat="server" CssClass="submit" Text="Edit" CausesValidation="False" meta:resourcekey="btnModifyResource1" OnClick="btnModify_Click" />
                        <asp:Button ID="btnSave" runat="server" CssClass="submit" Text="Save" meta:resourcekey="btnSaveResource1" OnClick="btnSave_Click" />
                        <asp:Button ID="btnCancel" runat="server" CssClass="reset" Text="Cancel" CausesValidation="False" meta:resourcekey="btnCancelResource1" OnClick="btnCancel_Click" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <table width="100%">
            <tr>
                <td align="center">
                    <asp:Label ID="lblError" runat="server" CssClass="error" ForeColor="Red" Width="100%" meta:resourcekey="lblErrorResource1"></asp:Label>
                </td>
            </tr>
        </table>
        <asp:Panel ID="Panel1" runat="server" Height="300px" ScrollBars="Auto" meta:resourcekey="Panel1Resource1">
            <asp:GridView CssClass="Grid" ID="gvHeadingSection" runat="server" AutoGenerateColumns="False" BackColor="#DEBA84"
                BorderColor="#990000" GridLines="Both" BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0"
                EmptyDataText="No Procedure Section Record Available!"
                DataKeyNames="Section,Description" DataSourceID="ODSHeadingSection" 
                AllowPaging="True" AllowSorting="True" meta:resourcekey="gvHeadingSectionResource1" 
                width="100%"
                OnRowCreated="gvHeadingSection_RowCreated" 
                OnSelectedIndexChanged="gvHeadingSection_SelectedIndexChanged">
                <Columns>
                    <asp:ButtonField DataTextField="Section" HeaderText="Section" CommandName="Select" SortExpression="Section" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="center" meta:resourcekey="BoundFieldResource1"/> 
                    <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" HeaderStyle-Width="800" meta:resourcekey="BoundFieldResource2"/>
                    <asp:BoundField DataField="OwnerGroupID" HeaderText="OwnerGroupID" SortExpression="OwnerGroupID" Visible="False" meta:resourcekey="BoundFieldResource3" />
                </Columns>
                <HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
                <RowStyle CssClass="GridRowStyle"/>
                <AlternatingRowStyle CssClass="GridRowStyle"/>
		        <SelectedRowStyle CssClass="GridSelectedRowStyle"/>
                <PagerStyle CssClass="GridPagerStyle" ForeColor="White"/>
                <FooterStyle CssClass="GridFooterStyle"/>
            </asp:GridView>
        </asp:Panel>
    </div>
</asp:Content>
